package com.ybg.social;
import org.springframework.social.security.SocialAuthenticationFilter;
import org.springframework.social.security.SpringSocialConfigurer;

/** @author zhailiang */
public class ImoocSpringSocialConfigurer extends SpringSocialConfigurer {
    
    private String filterProcessesUrl;
    
    public ImoocSpringSocialConfigurer(String filterProcessesUrl){
        this.filterProcessesUrl = filterProcessesUrl;
    }
    
    @SuppressWarnings("unchecked")
    @Override
    protected <T> T postProcess(T object){
        SocialAuthenticationFilter filter = (SocialAuthenticationFilter) super.postProcess(object);
        filter.setFilterProcessesUrl(filterProcessesUrl);
        return (T) filter;
    }
}
